<?php
	ob_end_flush();
	if ($action['xpath']) {
		$targets = $xpath->query($action['xpath']);
	} else {
		$targets = array($tag);
	}

	
	foreach($targets as $target) {
		$tmp = $target->getAttribute($action['attr']);
		$attr = new DOMAttr($action['attr']);

		$attr->value = $this->php2cdata('#VAR '.$action['var'].'#').$tmp;
		$target->setAttributeNode($attr);
	}
?>